﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.Master" AutoEventWireup="true" CodeBehind="checkout.aspx.cs" Inherits="web.deal.checkout" %>

<%@ Import Namespace="PRO.Common" %>
<%@ Import Namespace="PRO.Config" %>
<%@ Register Src="~/ErrorControl.ascx" TagPrefix="uc1" TagName="ErrorControl" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        table { width: 700px; }
        table th { text-align: left; background: #eee; }
    </style>
    <script type="text/javascript" src="/scripts/checkout.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Content" runat="server">
    <%if (Products > 0)
      { %>
    <form id="frm" action="/deal/submit" method="post" onsubmit="return confirm('您确定所填信息无误并提交订单吗？');">
        <input type="hidden" name="_g.d" value="<%=GUID %>" />
        <table>
            <tr>
                <th>确认收货地址</th>
            </tr>
            <tr>
                <td>
                    <%if (Addr_Counts <= 0)
                      { %>
                    <a href="/member/address/add?url=<%=Request.RawUrl.UrlEncode() %>">您还没有收货地址，现在就去添加》</a>
                    <%}
                      else
                      { %>
                    <table>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <input <%#(Eval("default_addr").ToBoolean(false))?"checked=\"checked\"":"" %> type="radio" name="_a.d" value="<%#Eval("id").DEC_Encode(BaseConfigs.DEC_KEY) %>" />
                                    </td>
                                    <td><%#Eval("consignee") %></td>
                                    <td><%#Eval("address") %></td>
                                    <td><%#Eval("zip") %></td>
                                    <td><%#Eval("phone") %><%#(!Eval("phone").ToString().IsNullOrWhiteSpace()&&!Eval("moble").ToString().IsNullOrWhiteSpace())?"/":"" %><%#Eval("moble") %></td>

                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        <tr>
                            <td colspan="5">
                                <a href="/member/address/add?url=<%=Request.RawUrl.UrlEncode() %>">添加收货地址》</a>
                            </td>
                        </tr>
                    </table>
                    <%} %>
                </td>

            </tr>
            <tr>
                <td>备注：
            <textarea name="_note"></textarea>
                </td>
            </tr>
            <tr>
                <th>订单确认</th>
            </tr>
            <tr>
                <td>
                    <table>
                        <asp:Repeater ID="Repeater2" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td><%#Eval("title") %></td>
                                    <td><%#Eval("totalPrice") %></td>
                                    <td>
                                        <%#Eval("Count") %>
                                        <td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </td>
            </tr>
            <tr>
                <td>使用礼品卡：<input type="text" name="_c.h.p" /><label></label></td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="提交订单" /></td>
            </tr>
        </table>
    </form>
    <%}
      else
      { %>
    <uc1:ErrorControl runat="server" ID="ErrorControl" />
    <%} %>
</asp:Content>
